﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace FrameEngine
{
    public interface ICommand
    {
        /// <summary>
        /// 主操作对象
        /// </summary>
        IApplication Application { get; }


        /// <summary>
        /// 工具的名称
        /// </summary>
        string CommandName { get; }


        /// <summary>
        /// 得到或设置标题
        /// </summary>
        string Caption { get; set; }


        /// <summary>
        /// 得到或设置图标
        /// </summary>
        ImageSource ImageSource { get; set; }


        /// <summary>
        /// 工具提示信息
        /// </summary>
        string ToolTip { get; set; }


        /// <summary>
        /// 是否处于选中状态
        /// </summary>
        bool IsChecked { get; set; }


        /// <summary>
        /// 是否可用
        /// </summary>
        bool IsEnabled { get; set; }


        /// <summary>
        /// 是否显示
        /// </summary>
        bool IsVisible { get; set; }


        /// <summary>
        /// 点击执行函数
        /// </summary>
        void OnClick();


        /// <summary>
        /// 设置命令UI
        /// </summary>
        /// <param name="pCommandUi"></param>
        void SetCommandUI(ICommandUI pCommandUi);


        /// <summary>
        /// 更新工具是否可见状态
        /// </summary>
        void UpdateVisibleState();


        /// <summary>
        /// 更新工具是否可用状态
        /// </summary>
        void UpdateEnableState();
    }
}
